import request from '@/utils/request'

// 查询所有批次
export function getAll(query) {
  return request({
    url: '/farmer/farmerbatch/getAll',
    method: 'get',
    params: query
  })
}

// 查询种植批次列表
export function listFarmerbatch(query) {
  return request({
    url: '/farmer/farmerbatch/list',
    method: 'get',
    params: query
  })
}

// 查询种植批次详细
export function getFarmerbatch(guid) {
  return request({
    url: '/farmer/farmerbatch/' + guid,
    method: 'get'
  })
}

// 新增种植批次
export function addFarmerbatch(data) {
  return request({
    url: '/farmer/farmerbatch',
    method: 'post',
    data: data
  })
}

// 修改种植批次
export function updateFarmerbatch(data) {
  return request({
    url: '/farmer/farmerbatch',
    method: 'put',
    data: data
  })
}

// 删除种植批次
export function delFarmerbatch(guid) {
  return request({
    url: '/farmer/farmerbatch/' + guid,
    method: 'delete'
  })
}

// 导出种植批次
export function exportFarmerbatch(query) {
  return request({
    url: '/farmer/farmerbatch/export',
    method: 'get',
    params: query
  })
}
